package com.ak.server.system.entity;

import com.ak.common.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.wuwenze.poi.annotation.Excel;
import com.wuwenze.poi.annotation.ExcelField;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * @author Vean
 */
@Data
@TableName("sys_role")
@Excel("角色信息表")
@EqualsAndHashCode(callSuper = false)
public class Role extends BaseEntity implements Serializable {

	private static final long serialVersionUID = -1714476694755654924L;

	@TableId(value = "role_id", type = IdType.UUID)
	private String roleId;

	@NotBlank(message = "{required}")
	@Size(max = 10, message = "{noMoreThan}")
	@ExcelField(value = "角色名称")
	private String roleName;

	private String roleKey;

	/**
	 * 数据范围（1：所有数据权限；2：自定义数据权限；3：本部门数据权限；4：本部门及以下数据权限）
	 */
	private String dataScope;

	private String sort;

	/**
	 * 菜单权限
	 */
	private transient String menuIds;

	/**
	 * 数据权限
	 */
	private transient String deptIds;
}
